Skip to content

New check_doc_fields()#2653

Merged
jennybc merged 6 commits into
mainfrom
check-doc-fields
Feb 10, 2026
Merged

New check_doc_fields()#2653
jennybc merged 6 commits into
mainfrom
check-doc-fields

Conversation

@hadley

@hadley hadley commented Jan 22, 2026

Copy link
Copy Markdown
Member

Fixes #2525

@gadenbuie can you take a look too please? I think this should be a nice tool for a coding agent to verify that it's updated all the needed docs.

@hadley hadley requested a review from jennybc January 22, 2026 16:00
@gadenbuie

Copy link
Copy Markdown

I've never used it, but I just discovered check_man(). Should this function name be check_man_fields() then? Or roll these checks into check_man(), maybe behind a flag?

It'd be nice to have one function for coding agents. I think agents also tend to call document() separately, so it'd be nice to skip documenting by default to speed up the check. So something like this

check_man <- function(pkg = ".", document = FALSE, check_fields = TRUE) {
  # ...
}

@hadley

hadley commented Jan 22, 2026

Copy link
Copy Markdown
Member Author

I'm not convinced that check_man() is that helpful. It can save you a little time compared to R CMD check but I generally find it detects problems that we don't tend to make any more.

@gadenbuie

gadenbuie commented Jan 22, 2026

Copy link
Copy Markdown

I agree for human usage, but at a quick glance I think check_man() would catch mistakes that are common among coding assistants. In particular, updating a function signature but not documenting the parameter is a common coding agent miss. In my experience, check_man() is much faster than a full check() (2s vs a full minute or more in btw for example).

That said, I haven't fully looked into what's covered by check_man()

@hadley

hadley commented Feb 9, 2026

Copy link
Copy Markdown
Member Author

Hmmm, interesting. I haven't noticed those problems myself.

@hadley hadley requested a review from DavisVaughan February 9, 2026 18:50

@DavisVaughan DavisVaughan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way I would ever remember this is if it was part of usethis::use_release_issue()'s checklist, but it seems very useful

It's a very common extrachecks pain point

@jennybc jennybc merged commit d3a352b into main Feb 10, 2026
@jennybc jennybc deleted the check-doc-fields branch February 10, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide helper for missing returns/examples

4 participants